/*
 * SEGUNDA ENTREGA DEL PROYECTO DE BASES DE DATOS "BIBLIOTECA DIGITAL"
 * 
 * Integrantes:
 * Gamboa Edwin Ricardo Cód: 0926631 plan: 2711
 * Portilla Cortes Maria Cristina Cód: 0844113 plan: 3743 
 * Rosero Rosero Luis Alberto Cód: 0943740 plan:3743
 * 
 */

/*
 * PanelGestionMaterial.java
 *
 * Created on 3/05/2011, 08:59:11 PM
 */
package gui;
import controlador.*;
import logica.*;
import java.util.*;
import javax.swing.*;
import java.io.*;
import java.nio.channels.FileChannel;

public class PanelGestionMaterial extends javax.swing.JPanel {
    Material material= new Material();
    String campo, mensaje, rutaArchivo, formato, diaCreacion, mesCreacion; 
    String anioCreacion, diaPublicacion, mesPublicacion, anioPublicacion;
    String lista28Dias[], lista30Dias[], lista31Dias[]; 
    String tamanoArchivo;
    AddAutoresMaterial dialogoAgregarAutores;
    AddAreasMaterial dialogoAgregarAreas;
    AddPalabraMaterial dialogoAgregarPalabras;
    Boolean archivoCargado = false;
        
    /** Creates new form PanelGestionMaterial */
    public PanelGestionMaterial() {
        initComponents();
        llenarListasDias();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel1 = new javax.swing.JPanel();
        jPanel11 = new javax.swing.JPanel();
        jPanel8 = new javax.swing.JPanel();
        jPanel4 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jTFCodigo1 = new javax.swing.JTextField();
        jTFTituloPri1 = new javax.swing.JTextField();
        jTFTituloSec1 = new javax.swing.JTextField();
        jTEditorial1 = new javax.swing.JTextField();
        jLabel8 = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTADescripcion1 = new javax.swing.JTextArea();
        jLabel11 = new javax.swing.JLabel();
        jCBDiaCreacion1 = new javax.swing.JComboBox();
        jCBMesCreacion1 = new javax.swing.JComboBox();
        jCBAnioCreacion1 = new javax.swing.JComboBox();
        jCBAnioPublicacion1 = new javax.swing.JComboBox();
        jCBMesPublicacion1 = new javax.swing.JComboBox();
        jCBDiaPublicacion1 = new javax.swing.JComboBox();
        jBCargarArchivo = new javax.swing.JButton();
        jCBIdioma1 = new javax.swing.JComboBox();
        jPanel17 = new javax.swing.JPanel();
        jPanel5 = new javax.swing.JPanel();
        jLabel10 = new javax.swing.JLabel();
        jTFCatalogador1 = new javax.swing.JTextField();
        jPanel6 = new javax.swing.JPanel();
        jLabel12 = new javax.swing.JLabel();
        jLabel13 = new javax.swing.JLabel();
        jTFTipo1 = new javax.swing.JTextField();
        jPanel7 = new javax.swing.JPanel();
        jBAddAuotres1 = new javax.swing.JButton();
        jBAddAreas1 = new javax.swing.JButton();
        jBAddPalabras1 = new javax.swing.JButton();
        jBCatalogar = new javax.swing.JButton();
        jBLimpiar = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        jScrollPane5 = new javax.swing.JScrollPane();
        jPanel12 = new javax.swing.JPanel();
        jPanel13 = new javax.swing.JPanel();
        jLabel17 = new javax.swing.JLabel();
        jLabel18 = new javax.swing.JLabel();
        jLabel19 = new javax.swing.JLabel();
        jLabel20 = new javax.swing.JLabel();
        jTFCodigo2 = new javax.swing.JTextField();
        jTFTituloPri2 = new javax.swing.JTextField();
        jTFTituloSec2 = new javax.swing.JTextField();
        jLabel25 = new javax.swing.JLabel();
        jCBAnioPublicacion2 = new javax.swing.JComboBox();
        jCBMesPublicacion2 = new javax.swing.JComboBox();
        jCBDianPublicacion2 = new javax.swing.JComboBox();
        jCBDiaCreacion2 = new javax.swing.JComboBox();
        jCBMesCreacion2 = new javax.swing.JComboBox();
        jCBAnioCreacion2 = new javax.swing.JComboBox();
        jBModificar1 = new javax.swing.JButton();
        jBGuardar1 = new javax.swing.JButton();
        jLabel21 = new javax.swing.JLabel();
        jScrollPane3 = new javax.swing.JScrollPane();
        jTADescripcion2 = new javax.swing.JTextArea();
        jLabel24 = new javax.swing.JLabel();
        jLabel23 = new javax.swing.JLabel();
        jTFEditorial2 = new javax.swing.JTextField();
        jCBIdioma2 = new javax.swing.JComboBox();
        jPanel15 = new javax.swing.JPanel();
        jPanel19 = new javax.swing.JPanel();
        jLabel31 = new javax.swing.JLabel();
        jLabel32 = new javax.swing.JLabel();
        jTFCodigo4 = new javax.swing.JTextField();
        jTFCatalogador2 = new javax.swing.JTextField();
        jBGuardarCatalogador = new javax.swing.JButton();
        jBModificarCatlogador = new javax.swing.JButton();
        jPanel14 = new javax.swing.JPanel();
        jLabel26 = new javax.swing.JLabel();
        jLabel27 = new javax.swing.JLabel();
        jTFTipo2 = new javax.swing.JTextField();
        jBGuardarTipo = new javax.swing.JButton();
        jBModificarTipo = new javax.swing.JButton();
        jLabel33 = new javax.swing.JLabel();
        jTFCodigo3 = new javax.swing.JTextField();
        jPanel16 = new javax.swing.JPanel();
        jBAddAreas2 = new javax.swing.JButton();
        jBAddAuotres2 = new javax.swing.JButton();
        jBAddPalabras2 = new javax.swing.JButton();
        jTFCodigo5 = new javax.swing.JTextField();
        jLabel34 = new javax.swing.JLabel();
        jBModificarAdicionales = new javax.swing.JButton();
        jBModificarOtros = new javax.swing.JButton();
        jPanel18 = new javax.swing.JPanel();
        jButton20 = new javax.swing.JButton();
        jPanel3 = new javax.swing.JPanel();
        jPanel20 = new javax.swing.JPanel();
        jLabel37 = new javax.swing.JLabel();
        jTFCodigo6 = new javax.swing.JTextField();
        jBDesactivar = new javax.swing.JButton();
        jBCancelaDesactivacion = new javax.swing.JButton();
        jPanel21 = new javax.swing.JPanel();
        jLabel38 = new javax.swing.JLabel();
        jTFCodigo7 = new javax.swing.JTextField();
        jBActivar = new javax.swing.JButton();
        jBCancelarActivacion = new javax.swing.JButton();
        jLabel58 = new javax.swing.JLabel();

        setBackground(new java.awt.Color(255, 255, 255));

        jTabbedPane1.setBackground(new java.awt.Color(255, 255, 255));
        jTabbedPane1.setForeground(new java.awt.Color(130, 134, 135));

        jPanel1.setBackground(new java.awt.Color(255, 255, 255));

        jPanel11.setBackground(new java.awt.Color(255, 255, 255));

        javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
        jPanel11.setLayout(jPanel11Layout);
        jPanel11Layout.setHorizontalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 754, Short.MAX_VALUE)
        );
        jPanel11Layout.setVerticalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 49, Short.MAX_VALUE)
        );

        jPanel8.setBackground(new java.awt.Color(255, 255, 255));

        jPanel4.setBackground(new java.awt.Color(255, 255, 255));
        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Informacion General", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Verdana", 1, 14), new java.awt.Color(235, 30, 30))); // NOI18N
        jPanel4.setForeground(javax.swing.UIManager.getDefaults().getColor("CheckBoxMenuItem.selectionBackground"));

        jLabel1.setFont(new java.awt.Font("Verdana", 1, 12));
        jLabel1.setForeground(new java.awt.Color(130, 134, 135));
        jLabel1.setText("Codigo");

        jLabel2.setFont(new java.awt.Font("Verdana", 1, 12));
        jLabel2.setForeground(new java.awt.Color(130, 134, 135));
        jLabel2.setText("Titulo Principal");

        jLabel3.setFont(new java.awt.Font("Verdana", 1, 12));
        jLabel3.setForeground(new java.awt.Color(130, 134, 135));
        jLabel3.setText("Titulo Secundario");

        jLabel4.setFont(new java.awt.Font("Verdana", 1, 12));
        jLabel4.setForeground(new java.awt.Color(130, 134, 135));
        jLabel4.setText("Fecha de Creacion");

        jLabel5.setFont(new java.awt.Font("Verdana", 1, 12));
        jLabel5.setForeground(new java.awt.Color(130, 134, 135));
        jLabel5.setText("Idioma");

        jLabel7.setFont(new java.awt.Font("Verdana", 1, 12));
        jLabel7.setForeground(new java.awt.Color(130, 134, 135));
        jLabel7.setText("Editorial");

        jTFCodigo1.setFont(new java.awt.Font("Verdana", 0, 12));
        jTFCodigo1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTFCodigo1ActionPerformed(evt);
            }
        });

        jTFTituloPri1.setFont(new java.awt.Font("Verdana", 0, 12));
        jTFTituloPri1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTFTituloPri1ActionPerformed(evt);
            }
        });

        jTFTituloSec1.setFont(new java.awt.Font("Verdana", 0, 12));

        jTEditorial1.setFont(new java.awt.Font("Verdana", 0, 12));
        jTEditorial1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTEditorial1ActionPerformed(evt);
            }
        });

        jLabel8.setFont(new java.awt.Font("Verdana", 1, 12));
        jLabel8.setForeground(new java.awt.Color(130, 134, 135));
        jLabel8.setText("Descripcion");

        jTADescripcion1.setColumns(20);
        jTADescripcion1.setFont(new java.awt.Font("Verdana", 0, 12));
        jTADescripcion1.setLineWrap(true);
        jTADescripcion1.setRows(5);
        jTADescripcion1.setWrapStyleWord(true);
        jScrollPane1.setViewportView(jTADescripcion1);

        jLabel11.setFont(new java.awt.Font("Verdana", 1, 12));
        jLabel11.setForeground(new java.awt.Color(130, 134, 135));
        jLabel11.setText("Fecha de Publicacion");

        jCBDiaCreacion1.setFont(new java.awt.Font("Verdana", 0, 12));
        jCBDiaCreacion1.setEnabled(false);
        jCBDiaCreacion1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCBDiaCreacion1ActionPerformed(evt);
            }
        });

        jCBMesCreacion1.setFont(new java.awt.Font("Verdana", 0, 12));
        jCBMesCreacion1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Mes:", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12" }));
        jCBMesCreacion1.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                jCBMesCreacion1ItemStateChanged(evt);
            }
        });
        jCBMesCreacion1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCBMesCreacion1ActionPerformed(evt);
            }
        });

        jCBAnioCreacion1.setFont(new java.awt.Font("Verdana", 0, 12));
        jCBAnioCreacion1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Año:", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012" }));
        jCBAnioCreacion1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCBAnioCreacion1ActionPerformed(evt);
            }
        });

        jCBAnioPublicacion1.setFont(new java.awt.Font("Verdana", 0, 12));
        jCBAnioPublicacion1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Año:", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012" }));

        jCBMesPublicacion1.setFont(new java.awt.Font("Verdana", 0, 12));
        jCBMesPublicacion1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Mes:", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12" }));
        jCBMesPublicacion1.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                jCBMesPublicacion1ItemStateChanged(evt);
            }
        });
        jCBMesPublicacion1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCBMesPublicacion1ActionPerformed(evt);
            }
        });

        jCBDiaPublicacion1.setFont(new java.awt.Font("Verdana", 0, 12));
        jCBDiaPublicacion1.setEnabled(false);
        jCBDiaPublicacion1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCBDiaPublicacion1ActionPerformed(evt);
            }
        });

        jBCargarArchivo.setBackground(new java.awt.Color(255, 255, 255));
        jBCargarArchivo.setFont(new java.awt.Font("Verdana", 1, 12));
        jBCargarArchivo.setForeground(new java.awt.Color(235, 30, 30));
        jBCargarArchivo.setText("Cargar Archivo");
        jBCargarArchivo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBCargarArchivoActionPerformed(evt);
            }
        });

        jCBIdioma1.setFont(new java.awt.Font("Verdana", 0, 12));
        jCBIdioma1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Escoja:", "Español", "Ingles", "Frances", "Aleman ", "Otro" }));

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 361, Short.MAX_VALUE)
                    .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
                            .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                .addComponent(jLabel11)
                                .addComponent(jLabel2)
                                .addComponent(jLabel1)
                                .addComponent(jLabel3)
                                .addComponent(jLabel4)
                                .addComponent(jLabel7)
                                .addComponent(jLabel5))
                            .addGap(10, 10, 10)
                            .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jCBIdioma1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(jTEditorial1, javax.swing.GroupLayout.DEFAULT_SIZE, 213, Short.MAX_VALUE)
                                    .addComponent(jTFTituloPri1)
                                    .addComponent(jTFCodigo1, javax.swing.GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE)
                                    .addGroup(jPanel4Layout.createSequentialGroup()
                                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                            .addComponent(jCBAnioPublicacion1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(jCBAnioCreacion1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                            .addComponent(jCBMesPublicacion1, javax.swing.GroupLayout.Alignment.TRAILING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(jCBMesCreacion1, javax.swing.GroupLayout.Alignment.TRAILING, 0, 62, Short.MAX_VALUE))
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                            .addComponent(jCBDiaCreacion1, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(jCBDiaPublicacion1, 0, 53, Short.MAX_VALUE)))
                                    .addComponent(jTFTituloSec1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 213, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel8))))
                        .addComponent(jBCargarArchivo)))
                .addContainerGap())
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTFCodigo1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel1))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTFTituloPri1, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTFTituloSec1, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jCBMesCreacion1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel4)
                    .addComponent(jCBAnioCreacion1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jCBDiaCreacion1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jCBMesPublicacion1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel11)
                    .addComponent(jCBDiaPublicacion1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jCBAnioPublicacion1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(jCBIdioma1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTEditorial1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel7))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabel8)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jBCargarArchivo)
                .addGap(21, 21, 21))
        );

        jPanel17.setBackground(new java.awt.Color(255, 255, 255));

        jPanel5.setBackground(new java.awt.Color(255, 255, 255));
        jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Catalogacion", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Verdana", 1, 14), new java.awt.Color(235, 30, 30))); // NOI18N

        jLabel10.setFont(new java.awt.Font("Verdana", 1, 12));
        jLabel10.setForeground(new java.awt.Color(130, 134, 135));
        jLabel10.setText("Codigo Catalogador");

        jTFCatalogador1.setFont(new java.awt.Font("Verdana", 0, 12));
        jTFCatalogador1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTFCatalogador1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel10)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jTFCatalogador1, javax.swing.GroupLayout.DEFAULT_SIZE, 110, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel10)
                    .addComponent(jTFCatalogador1))
                .addContainerGap())
        );

        jPanel6.setBackground(new java.awt.Color(255, 255, 255));
        jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Tipo de Material", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Verdana", 1, 14), new java.awt.Color(235, 30, 30))); // NOI18N

        jLabel12.setFont(new java.awt.Font("Verdana", 1, 12));
        jLabel12.setForeground(new java.awt.Color(130, 134, 135));
        jLabel12.setText("Codigo Tipo");

        jTFTipo1.setFont(new java.awt.Font("Verdana", 0, 12));
        jTFTipo1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTFTipo1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel13)
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addComponent(jLabel12)
                        .addGap(18, 18, 18)
                        .addComponent(jTFTipo1, javax.swing.GroupLayout.DEFAULT_SIZE, 154, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel12)
                    .addComponent(jTFTipo1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 19, Short.MAX_VALUE)
                .addComponent(jLabel13))
        );

        jPanel7.setBackground(new java.awt.Color(255, 255, 255));
        jPanel7.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Atributos Adicionales", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Verdana", 1, 14), new java.awt.Color(235, 30, 30))); // NOI18N

        jBAddAuotres1.setBackground(new java.awt.Color(255, 255, 255));
        jBAddAuotres1.setFont(new java.awt.Font("Verdana", 1, 12));
        jBAddAuotres1.setForeground(new java.awt.Color(235, 30, 30));
        jBAddAuotres1.setText("Agregar Autores");
        jBAddAuotres1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBAddAuotres1ActionPerformed(evt);
            }
        });

        jBAddAreas1.setBackground(new java.awt.Color(255, 255, 255));
        jBAddAreas1.setFont(new java.awt.Font("Verdana", 1, 12));
        jBAddAreas1.setForeground(new java.awt.Color(235, 30, 30));
        jBAddAreas1.setText("Agregar Areas de Conocimiento");
        jBAddAreas1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBAddAreas1ActionPerformed(evt);
            }
        });

        jBAddPalabras1.setBackground(new java.awt.Color(255, 255, 255));
        jBAddPalabras1.setFont(new java.awt.Font("Verdana", 1, 12));
        jBAddPalabras1.setForeground(new java.awt.Color(235, 30, 30));
        jBAddPalabras1.setText("Agregar Palabras Clave");
        jBAddPalabras1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBAddPalabras1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addGap(18, 18, 18)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jBAddAuotres1, javax.swing.GroupLayout.DEFAULT_SIZE, 241, Short.MAX_VALUE)
                    .addComponent(jBAddAreas1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jBAddPalabras1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 241, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addGap(16, 16, 16)
                .addComponent(jBAddAuotres1)
                .addGap(18, 18, 18)
                .addComponent(jBAddAreas1)
                .addGap(18, 18, 18)
                .addComponent(jBAddPalabras1)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel17Layout = new javax.swing.GroupLayout(jPanel17);
        jPanel17.setLayout(jPanel17Layout);
        jPanel17Layout.setHorizontalGroup(
            jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel17Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jPanel7, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel5, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel6, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel17Layout.setVerticalGroup(
            jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel17Layout.createSequentialGroup()
                .addGap(11, 11, 11)
                .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jBCatalogar.setBackground(new java.awt.Color(255, 255, 255));
        jBCatalogar.setFont(new java.awt.Font("Verdana", 1, 14));
        jBCatalogar.setForeground(new java.awt.Color(235, 30, 30));
        jBCatalogar.setText("Catalogar");
        jBCatalogar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBCatalogarActionPerformed(evt);
            }
        });

        jBLimpiar.setBackground(new java.awt.Color(255, 255, 255));
        jBLimpiar.setFont(new java.awt.Font("Verdana", 1, 14));
        jBLimpiar.setForeground(new java.awt.Color(235, 30, 30));
        jBLimpiar.setText("Limpiar Todo");
        jBLimpiar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBLimpiarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(jPanel17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addGap(223, 223, 223)
                        .addComponent(jBCatalogar)
                        .addGap(30, 30, 30)
                        .addComponent(jBLimpiar)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, 410, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jBCatalogar)
                    .addComponent(jBLimpiar))
                .addContainerGap(18, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(20, 20, 20)
                        .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jPanel11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(23, 23, 23))
        );

        jTabbedPane1.addTab("Catalogar", jPanel1);

        jPanel2.setBackground(new java.awt.Color(255, 255, 255));

        jScrollPane5.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);

        jPanel12.setBackground(new java.awt.Color(255, 255, 255));

        jPanel13.setBackground(new java.awt.Color(255, 255, 255));
        jPanel13.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Modificar Informacion General", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Verdana", 1, 14), new java.awt.Color(235, 30, 30))); // NOI18N
        jPanel13.setForeground(javax.swing.UIManager.getDefaults().getColor("CheckBoxMenuItem.selectionBackground"));

        jLabel17.setFont(new java.awt.Font("Verdana", 1, 12));
        jLabel17.setForeground(new java.awt.Color(130, 134, 135));
        jLabel17.setText("Codigo del Material");

        jLabel18.setFont(new java.awt.Font("Verdana", 1, 12));
        jLabel18.setForeground(new java.awt.Color(130, 134, 135));
        jLabel18.setText("Titulo Principal");

        jLabel19.setFont(new java.awt.Font("Verdana", 1, 12));
        jLabel19.setForeground(new java.awt.Color(130, 134, 135));
        jLabel19.setText("Titulo Secundario");

        jLabel20.setFont(new java.awt.Font("Verdana", 1, 12));
        jLabel20.setForeground(new java.awt.Color(130, 134, 135));
        jLabel20.setText("Fecha de Creacion");

        jTFCodigo2.setFont(new java.awt.Font("Verdana", 0, 12));
        jTFCodigo2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTFCodigo2ActionPerformed(evt);
            }
        });

        jTFTituloPri2.setEditable(false);
        jTFTituloPri2.setFont(new java.awt.Font("Verdana", 0, 12));
        jTFTituloPri2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTFTituloPri2ActionPerformed(evt);
            }
        });

        jTFTituloSec2.setEditable(false);
        jTFTituloSec2.setFont(new java.awt.Font("Verdana", 0, 12));

        jLabel25.setFont(new java.awt.Font("Verdana", 1, 12));
        jLabel25.setForeground(new java.awt.Color(130, 134, 135));
        jLabel25.setText("Fecha de Publicacion");

        jCBAnioPublicacion2.setFont(new java.awt.Font("Verdana", 0, 12));
        jCBAnioPublicacion2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Año:", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012" }));
        jCBAnioPublicacion2.setEnabled(false);

        jCBMesPublicacion2.setFont(new java.awt.Font("Verdana", 0, 12));
        jCBMesPublicacion2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Mes:", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12" }));
        jCBMesPublicacion2.setEnabled(false);
        jCBMesPublicacion2.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                jCBMesPublicacion2ItemStateChanged(evt);
            }
        });

        jCBDianPublicacion2.setFont(new java.awt.Font("Verdana", 0, 12));
        jCBDianPublicacion2.setEnabled(false);
        jCBDianPublicacion2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCBDianPublicacion2ActionPerformed(evt);
            }
        });

        jCBDiaCreacion2.setFont(new java.awt.Font("Verdana", 0, 12));
        jCBDiaCreacion2.setEnabled(false);
        jCBDiaCreacion2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCBDiaCreacion2ActionPerformed(evt);
            }
        });

        jCBMesCreacion2.setFont(new java.awt.Font("Verdana", 0, 12));
        jCBMesCreacion2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Mes:", "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12" }));
        jCBMesCreacion2.setEnabled(false);
        jCBMesCreacion2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCBMesCreacion2ActionPerformed(evt);
            }
        });

        jCBAnioCreacion2.setFont(new java.awt.Font("Verdana", 0, 12));
        jCBAnioCreacion2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Año:", "2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010", "2011", "2012" }));
        jCBAnioCreacion2.setEnabled(false);
        jCBAnioCreacion2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCBAnioCreacion2ActionPerformed(evt);
            }
        });

        jBModificar1.setBackground(new java.awt.Color(255, 255, 255));
        jBModificar1.setFont(new java.awt.Font("Verdana", 1, 12));
        jBModificar1.setForeground(new java.awt.Color(235, 30, 30));
        jBModificar1.setText("Modificar");
        jBModificar1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBModificar1ActionPerformed(evt);
            }
        });

        jBGuardar1.setBackground(new java.awt.Color(255, 255, 255));
        jBGuardar1.setFont(new java.awt.Font("Verdana", 1, 12));
        jBGuardar1.setForeground(new java.awt.Color(235, 30, 30));
        jBGuardar1.setText("Guardar");
        jBGuardar1.setEnabled(false);
        jBGuardar1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBGuardar1ActionPerformed(evt);
            }
        });

        jLabel21.setFont(new java.awt.Font("Verdana", 1, 12));
        jLabel21.setForeground(new java.awt.Color(130, 134, 135));
        jLabel21.setText("Idioma");

        jTADescripcion2.setColumns(10);
        jTADescripcion2.setEditable(false);
        jTADescripcion2.setFont(new java.awt.Font("Verdana", 0, 12));
        jTADescripcion2.setLineWrap(true);
        jTADescripcion2.setRows(4);
        jTADescripcion2.setWrapStyleWord(true);
        jTADescripcion2.setOpaque(false);
        jScrollPane3.setViewportView(jTADescripcion2);

        jLabel24.setFont(new java.awt.Font("Verdana", 1, 12));
        jLabel24.setForeground(new java.awt.Color(130, 134, 135));
        jLabel24.setText("Descripcion");

        jLabel23.setFont(new java.awt.Font("Verdana", 1, 12));
        jLabel23.setForeground(new java.awt.Color(130, 134, 135));
        jLabel23.setText("Editorial");

        jTFEditorial2.setEditable(false);
        jTFEditorial2.setFont(new java.awt.Font("Verdana", 0, 12));

        jCBIdioma2.setFont(new java.awt.Font("Verdana", 0, 12));
        jCBIdioma2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Escoja:", "Español", "Ingles", "Frances", "Aleman ", "Otro" }));
        jCBIdioma2.setEnabled(false);

        javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13);
        jPanel13.setLayout(jPanel13Layout);
        jPanel13Layout.setHorizontalGroup(
            jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel13Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(jPanel13Layout.createSequentialGroup()
                            .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addGroup(jPanel13Layout.createSequentialGroup()
                                    .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                        .addComponent(jLabel23)
                                        .addComponent(jLabel18)
                                        .addComponent(jLabel17)
                                        .addComponent(jLabel19)
                                        .addComponent(jLabel20)
                                        .addComponent(jLabel25)
                                        .addComponent(jLabel21))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(jCBIdioma2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(jTFEditorial2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 188, Short.MAX_VALUE)
                                        .addComponent(jTFTituloSec2, javax.swing.GroupLayout.DEFAULT_SIZE, 188, Short.MAX_VALUE)
                                        .addComponent(jTFTituloPri2, javax.swing.GroupLayout.DEFAULT_SIZE, 188, Short.MAX_VALUE)
                                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel13Layout.createSequentialGroup()
                                            .addComponent(jTFCodigo2, javax.swing.GroupLayout.DEFAULT_SIZE, 89, Short.MAX_VALUE)
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jBModificar1))
                                        .addGroup(jPanel13Layout.createSequentialGroup()
                                            .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                .addComponent(jCBAnioCreacion2, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                .addComponent(jCBAnioPublicacion2, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE))
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                                .addComponent(jCBMesPublicacion2, javax.swing.GroupLayout.Alignment.TRAILING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                                .addComponent(jCBMesCreacion2, javax.swing.GroupLayout.Alignment.TRAILING, 0, 60, Short.MAX_VALUE))
                                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                .addComponent(jCBDiaCreacion2, 0, 58, Short.MAX_VALUE)
                                                .addComponent(jCBDianPublicacion2, 0, 58, Short.MAX_VALUE)))))
                                .addComponent(jScrollPane3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 336, Short.MAX_VALUE))
                            .addContainerGap())
                        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel13Layout.createSequentialGroup()
                            .addComponent(jLabel24)
                            .addGap(137, 137, 137)))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel13Layout.createSequentialGroup()
                        .addComponent(jBGuardar1)
                        .addGap(30, 30, 30))))
        );
        jPanel13Layout.setVerticalGroup(
            jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel13Layout.createSequentialGroup()
                .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTFCodigo2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jBModificar1)
                    .addComponent(jLabel17))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTFTituloPri2, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel18))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTFTituloSec2, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel19))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel13Layout.createSequentialGroup()
                        .addGap(7, 7, 7)
                        .addComponent(jLabel20))
                    .addGroup(jPanel13Layout.createSequentialGroup()
                        .addGap(30, 30, 30)
                        .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jCBMesPublicacion2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel25)
                            .addComponent(jCBAnioPublicacion2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jCBDianPublicacion2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jCBMesCreacion2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jCBAnioCreacion2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jCBDiaCreacion2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(11, 11, 11)
                .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel21)
                    .addComponent(jCBIdioma2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTFEditorial2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel23))
                .addGap(13, 13, 13)
                .addComponent(jLabel24)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jBGuardar1)
                .addGap(30, 30, 30))
        );

        jPanel15.setBackground(new java.awt.Color(255, 255, 255));

        jPanel19.setBackground(new java.awt.Color(255, 255, 255));
        jPanel19.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Catalogador", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Verdana", 1, 14), new java.awt.Color(235, 30, 30))); // NOI18N

        jLabel31.setFont(new java.awt.Font("Verdana", 1, 12));
        jLabel31.setForeground(new java.awt.Color(130, 134, 135));
        jLabel31.setText("Codigo del Material");

        jLabel32.setFont(new java.awt.Font("Verdana", 1, 12));
        jLabel32.setForeground(new java.awt.Color(130, 134, 135));
        jLabel32.setText("Codigo Catalogador");

        jTFCodigo4.setFont(new java.awt.Font("Verdana", 0, 12));
        jTFCodigo4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTFCodigo4ActionPerformed(evt);
            }
        });

        jTFCatalogador2.setEditable(false);
        jTFCatalogador2.setFont(new java.awt.Font("Verdana", 0, 12));
        jTFCatalogador2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTFCatalogador2ActionPerformed(evt);
            }
        });

        jBGuardarCatalogador.setBackground(new java.awt.Color(255, 255, 255));
        jBGuardarCatalogador.setFont(new java.awt.Font("Verdana", 1, 12));
        jBGuardarCatalogador.setForeground(new java.awt.Color(235, 30, 30));
        jBGuardarCatalogador.setText("Guardar");
        jBGuardarCatalogador.setEnabled(false);
        jBGuardarCatalogador.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBGuardarCatalogadorActionPerformed(evt);
            }
        });

        jBModificarCatlogador.setBackground(new java.awt.Color(255, 255, 255));
        jBModificarCatlogador.setFont(new java.awt.Font("Verdana", 1, 12));
        jBModificarCatlogador.setForeground(new java.awt.Color(235, 30, 30));
        jBModificarCatlogador.setText("Modificar");
        jBModificarCatlogador.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBModificarCatlogadorActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel19Layout = new javax.swing.GroupLayout(jPanel19);
        jPanel19.setLayout(jPanel19Layout);
        jPanel19Layout.setHorizontalGroup(
            jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel19Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel19Layout.createSequentialGroup()
                        .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel32)
                            .addComponent(jLabel31))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel19Layout.createSequentialGroup()
                                .addComponent(jTFCodigo4, javax.swing.GroupLayout.DEFAULT_SIZE, 84, Short.MAX_VALUE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jBModificarCatlogador))
                            .addComponent(jTFCatalogador2, javax.swing.GroupLayout.DEFAULT_SIZE, 183, Short.MAX_VALUE)))
                    .addComponent(jBGuardarCatalogador, javax.swing.GroupLayout.Alignment.TRAILING))
                .addContainerGap())
        );
        jPanel19Layout.setVerticalGroup(
            jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel19Layout.createSequentialGroup()
                .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTFCodigo4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jBModificarCatlogador)
                    .addComponent(jLabel31))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel32)
                    .addComponent(jTFCatalogador2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(11, 11, 11)
                .addComponent(jBGuardarCatalogador)
                .addContainerGap())
        );

        jPanel14.setBackground(new java.awt.Color(255, 255, 255));
        jPanel14.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Tipo de Material", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Verdana", 1, 14), new java.awt.Color(235, 30, 30))); // NOI18N

        jLabel26.setFont(new java.awt.Font("Verdana", 1, 12));
        jLabel26.setForeground(new java.awt.Color(130, 134, 135));
        jLabel26.setText("Codigo Tipo");

        jTFTipo2.setEditable(false);
        jTFTipo2.setFont(new java.awt.Font("Verdana", 0, 12));
        jTFTipo2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTFTipo2ActionPerformed(evt);
            }
        });

        jBGuardarTipo.setBackground(new java.awt.Color(255, 255, 255));
        jBGuardarTipo.setFont(new java.awt.Font("Verdana", 1, 12));
        jBGuardarTipo.setForeground(new java.awt.Color(235, 30, 30));
        jBGuardarTipo.setText("Guardar");
        jBGuardarTipo.setEnabled(false);
        jBGuardarTipo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBGuardarTipoActionPerformed(evt);
            }
        });

        jBModificarTipo.setBackground(new java.awt.Color(255, 255, 255));
        jBModificarTipo.setFont(new java.awt.Font("Verdana", 1, 12));
        jBModificarTipo.setForeground(new java.awt.Color(235, 30, 30));
        jBModificarTipo.setText("Modificar");
        jBModificarTipo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBModificarTipoActionPerformed(evt);
            }
        });

        jLabel33.setFont(new java.awt.Font("Verdana", 1, 12));
        jLabel33.setForeground(new java.awt.Color(130, 134, 135));
        jLabel33.setText("Codigo del Material");

        jTFCodigo3.setFont(new java.awt.Font("Verdana", 0, 12));
        jTFCodigo3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTFCodigo3ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel14Layout = new javax.swing.GroupLayout(jPanel14);
        jPanel14.setLayout(jPanel14Layout);
        jPanel14Layout.setHorizontalGroup(
            jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel14Layout.createSequentialGroup()
                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel14Layout.createSequentialGroup()
                        .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel33)
                            .addComponent(jLabel26))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel27)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel14Layout.createSequentialGroup()
                                .addComponent(jTFCodigo3, javax.swing.GroupLayout.DEFAULT_SIZE, 98, Short.MAX_VALUE)
                                .addGap(2, 2, 2)
                                .addComponent(jBModificarTipo))
                            .addComponent(jTFTipo2, javax.swing.GroupLayout.DEFAULT_SIZE, 193, Short.MAX_VALUE)))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel14Layout.createSequentialGroup()
                        .addContainerGap(239, Short.MAX_VALUE)
                        .addComponent(jBGuardarTipo)))
                .addContainerGap())
        );
        jPanel14Layout.setVerticalGroup(
            jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel14Layout.createSequentialGroup()
                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel33)
                    .addComponent(jTFCodigo3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jBModificarTipo))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel26)
                    .addComponent(jTFTipo2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jBGuardarTipo)
                .addGap(13, 13, 13)
                .addComponent(jLabel27))
        );

        jPanel16.setBackground(new java.awt.Color(255, 255, 255));
        jPanel16.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Modificar Atributos Adicionales", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Verdana", 1, 14), new java.awt.Color(235, 30, 30))); // NOI18N

        jBAddAreas2.setBackground(new java.awt.Color(255, 255, 255));
        jBAddAreas2.setFont(new java.awt.Font("Verdana", 1, 12));
        jBAddAreas2.setForeground(new java.awt.Color(235, 30, 30));
        jBAddAreas2.setText("Agregar o Quitar Areas de Conocimiento");
        jBAddAreas2.setEnabled(false);
        jBAddAreas2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBAddAreas2ActionPerformed(evt);
            }
        });

        jBAddAuotres2.setBackground(new java.awt.Color(255, 255, 255));
        jBAddAuotres2.setFont(new java.awt.Font("Verdana", 1, 12));
        jBAddAuotres2.setForeground(new java.awt.Color(235, 30, 30));
        jBAddAuotres2.setText("Agregar o Quitar Autores");
        jBAddAuotres2.setEnabled(false);
        jBAddAuotres2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBAddAuotres2ActionPerformed(evt);
            }
        });

        jBAddPalabras2.setBackground(new java.awt.Color(255, 255, 255));
        jBAddPalabras2.setFont(new java.awt.Font("Verdana", 1, 12));
        jBAddPalabras2.setForeground(new java.awt.Color(235, 30, 30));
        jBAddPalabras2.setText("Agregar o Quitar Palabras Clave");
        jBAddPalabras2.setEnabled(false);
        jBAddPalabras2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBAddPalabras2ActionPerformed(evt);
            }
        });

        jTFCodigo5.setFont(new java.awt.Font("Verdana", 0, 12));
        jTFCodigo5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTFCodigo5ActionPerformed(evt);
            }
        });

        jLabel34.setFont(new java.awt.Font("Verdana", 1, 12));
        jLabel34.setForeground(new java.awt.Color(130, 134, 135));
        jLabel34.setText("Codigo del Material");

        jBModificarAdicionales.setBackground(new java.awt.Color(255, 255, 255));
        jBModificarAdicionales.setFont(new java.awt.Font("Verdana", 1, 12));
        jBModificarAdicionales.setForeground(new java.awt.Color(235, 30, 30));
        jBModificarAdicionales.setText("Modificar");
        jBModificarAdicionales.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBModificarAdicionalesActionPerformed(evt);
            }
        });

        jBModificarOtros.setBackground(new java.awt.Color(255, 255, 255));
        jBModificarOtros.setFont(new java.awt.Font("Verdana", 1, 12));
        jBModificarOtros.setForeground(new java.awt.Color(235, 30, 30));
        jBModificarOtros.setText("Modificar Otros");
        jBModificarOtros.setEnabled(false);
        jBModificarOtros.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBModificarOtrosActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel16Layout = new javax.swing.GroupLayout(jPanel16);
        jPanel16.setLayout(jPanel16Layout);
        jPanel16Layout.setHorizontalGroup(
            jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel16Layout.createSequentialGroup()
                .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel16Layout.createSequentialGroup()
                        .addGap(6, 6, 6)
                        .addComponent(jLabel34)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jTFCodigo5, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jBModificarAdicionales, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addGroup(jPanel16Layout.createSequentialGroup()
                        .addGap(26, 26, 26)
                        .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(jBAddAuotres2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jBAddAreas2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jBAddPalabras2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
                .addContainerGap())
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel16Layout.createSequentialGroup()
                .addContainerGap(102, Short.MAX_VALUE)
                .addComponent(jBModificarOtros)
                .addGap(99, 99, 99))
        );
        jPanel16Layout.setVerticalGroup(
            jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel16Layout.createSequentialGroup()
                .addGap(11, 11, 11)
                .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel34)
                    .addComponent(jTFCodigo5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jBModificarAdicionales))
                .addGap(11, 11, 11)
                .addComponent(jBAddAuotres2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jBAddAreas2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jBAddPalabras2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 8, Short.MAX_VALUE)
                .addComponent(jBModificarOtros)
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanel15Layout = new javax.swing.GroupLayout(jPanel15);
        jPanel15.setLayout(jPanel15Layout);
        jPanel15Layout.setHorizontalGroup(
            jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel16, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(jPanel19, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addComponent(jPanel14, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        jPanel15Layout.setVerticalGroup(
            jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel15Layout.createSequentialGroup()
                .addComponent(jPanel14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel19, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);
        jPanel12.setLayout(jPanel12Layout);
        jPanel12Layout.setHorizontalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel12Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jPanel15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(63, Short.MAX_VALUE))
        );
        jPanel12Layout.setVerticalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addGroup(jPanel12Layout.createSequentialGroup()
                .addGap(11, 11, 11)
                .addComponent(jPanel13, javax.swing.GroupLayout.PREFERRED_SIZE, 467, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        jScrollPane5.setViewportView(jPanel12);

        jPanel18.setBackground(new java.awt.Color(255, 255, 255));

        jButton20.setBackground(new java.awt.Color(255, 255, 255));
        jButton20.setFont(new java.awt.Font("Verdana", 1, 14));
        jButton20.setForeground(new java.awt.Color(235, 30, 30));
        jButton20.setText("Limpiar Todo");
        jButton20.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton20ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel18Layout = new javax.swing.GroupLayout(jPanel18);
        jPanel18.setLayout(jPanel18Layout);
        jPanel18Layout.setHorizontalGroup(
            jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel18Layout.createSequentialGroup()
                .addGap(347, 347, 347)
                .addComponent(jButton20)
                .addContainerGap(292, Short.MAX_VALUE))
        );
        jPanel18Layout.setVerticalGroup(
            jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel18Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jButton20)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel18, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 754, Short.MAX_VALUE)
                .addGap(10, 10, 10))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 404, Short.MAX_VALUE)
                .addGap(18, 18, 18)
                .addComponent(jPanel18, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        jTabbedPane1.addTab("Modificar", jPanel2);

        jPanel3.setBackground(new java.awt.Color(255, 255, 255));

        jPanel20.setBackground(new java.awt.Color(255, 255, 255));
        jPanel20.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Desactivar Material", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Verdana", 1, 14), new java.awt.Color(235, 30, 30))); // NOI18N

        jLabel37.setFont(new java.awt.Font("Verdana", 1, 12));
        jLabel37.setForeground(new java.awt.Color(130, 134, 135));
        jLabel37.setText("Codigo del Material");

        jTFCodigo6.setFont(new java.awt.Font("Verdana", 0, 12));
        jTFCodigo6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTFCodigo6ActionPerformed(evt);
            }
        });

        jBDesactivar.setBackground(new java.awt.Color(255, 255, 255));
        jBDesactivar.setFont(new java.awt.Font("Verdana", 1, 12));
        jBDesactivar.setForeground(new java.awt.Color(235, 30, 30));
        jBDesactivar.setText("Desactivar");
        jBDesactivar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBDesactivarActionPerformed(evt);
            }
        });

        jBCancelaDesactivacion.setBackground(new java.awt.Color(255, 255, 255));
        jBCancelaDesactivacion.setFont(new java.awt.Font("Verdana", 1, 12));
        jBCancelaDesactivacion.setForeground(new java.awt.Color(235, 30, 30));
        jBCancelaDesactivacion.setText("Cancelar");
        jBCancelaDesactivacion.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBCancelaDesactivacionActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel20Layout = new javax.swing.GroupLayout(jPanel20);
        jPanel20.setLayout(jPanel20Layout);
        jPanel20Layout.setHorizontalGroup(
            jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel20Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel37)
                .addGap(18, 18, 18)
                .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel20Layout.createSequentialGroup()
                        .addComponent(jBDesactivar, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jBCancelaDesactivacion, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jTFCodigo6, javax.swing.GroupLayout.DEFAULT_SIZE, 236, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel20Layout.setVerticalGroup(
            jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel20Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel37)
                    .addComponent(jTFCodigo6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jBDesactivar)
                    .addComponent(jBCancelaDesactivacion))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel21.setBackground(new java.awt.Color(255, 255, 255));
        jPanel21.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Activar Material", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Verdana", 1, 14), new java.awt.Color(235, 30, 30))); // NOI18N

        jLabel38.setFont(new java.awt.Font("Verdana", 1, 12));
        jLabel38.setForeground(new java.awt.Color(130, 134, 135));
        jLabel38.setText("Codigo del Material");

        jTFCodigo7.setFont(new java.awt.Font("Verdana", 0, 12));
        jTFCodigo7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jTFCodigo7ActionPerformed(evt);
            }
        });

        jBActivar.setBackground(new java.awt.Color(255, 255, 255));
        jBActivar.setFont(new java.awt.Font("Verdana", 1, 12));
        jBActivar.setForeground(new java.awt.Color(235, 30, 30));
        jBActivar.setText("Activar");
        jBActivar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBActivarActionPerformed(evt);
            }
        });

        jBCancelarActivacion.setBackground(new java.awt.Color(255, 255, 255));
        jBCancelarActivacion.setFont(new java.awt.Font("Verdana", 1, 12));
        jBCancelarActivacion.setForeground(new java.awt.Color(235, 30, 30));
        jBCancelarActivacion.setText("Cancelar");
        jBCancelarActivacion.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBCancelarActivacionActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel21Layout = new javax.swing.GroupLayout(jPanel21);
        jPanel21.setLayout(jPanel21Layout);
        jPanel21Layout.setHorizontalGroup(
            jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel21Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel38)
                .addGap(18, 18, 18)
                .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel21Layout.createSequentialGroup()
                        .addComponent(jBActivar, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jBCancelarActivacion, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jTFCodigo7, javax.swing.GroupLayout.DEFAULT_SIZE, 236, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel21Layout.setVerticalGroup(
            jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel21Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel38)
                    .addComponent(jTFCodigo7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jBActivar)
                    .addComponent(jBCancelarActivacion))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGap(157, 157, 157)
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jPanel20, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel21, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(241, 241, 241))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addGap(87, 87, 87)
                .addComponent(jPanel20, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(72, 72, 72)
                .addComponent(jPanel21, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(87, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Desactivar - Activar", jPanel3);

        jLabel58.setBackground(new java.awt.Color(255, 255, 255));
        jLabel58.setFont(new java.awt.Font("Verdana", 1, 22));
        jLabel58.setForeground(new java.awt.Color(235, 30, 30));
        jLabel58.setText("Gestionar Material");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(305, 305, 305)
                .addComponent(jLabel58)
                .addContainerGap())
            .addGroup(layout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 779, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabel58)
                .addGap(18, 18, 18)
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 510, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void jBCancelaDesactivacionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBCancelaDesactivacionActionPerformed
        // TODO add your handling code here:
        jTFCodigo6.setText("");
}//GEN-LAST:event_jBCancelaDesactivacionActionPerformed

    private void jTFCodigo6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTFCodigo6ActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jTFCodigo6ActionPerformed

    private void jBGuardar1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBGuardar1ActionPerformed
        // TODO add your handling code here:
        ControladorMaterial controlador= new ControladorMaterial();  
       
        diaCreacion = jCBDiaCreacion2.getSelectedItem().toString();        
        mesCreacion = jCBMesCreacion2.getSelectedItem().toString();        
        anioCreacion = jCBAnioCreacion2.getSelectedItem().toString();        
        diaPublicacion = jCBDianPublicacion2.getSelectedItem().toString();        
        mesPublicacion = jCBMesPublicacion2.getSelectedItem().toString();        
        anioPublicacion = jCBAnioPublicacion2.getSelectedItem().toString();
        
        if(modificacionValida()){
            String codigo = jTFCodigo2.getText();
            String tit_pri = jTFTituloPri2.getText();
            String tit_sec = jTFTituloSec2.getText();
            String fecha_creacion = anioCreacion+"-"+mesCreacion+"-"+diaCreacion;
            String fecha_publicacion = anioPublicacion+"-"+mesPublicacion+
                    "-"+diaPublicacion;
            String idioma = String.valueOf(jCBIdioma2.getSelectedItem());
            String editorial = jTFEditorial2.getText();
            String descripcion = jTADescripcion2.getText();
            String salida = "";
            
            if(!tit_pri.equals(material.getTitulo_pri())){                
                salida+="Titulo Principal:    " + material.getTitulo_pri() + 
                        "    ---->    " + tit_pri + "\n";
                controlador.modificarMaterial(1, codigo, tit_pri);
            }            
            if(!tit_sec.equals(material.getTitulo_sec())){                
                salida+="Titulo Secundario:    " + material.getTitulo_sec() + 
                        "    ---->    " + tit_sec + "\n";
                controlador.modificarMaterial(2, codigo, tit_sec);
            }
            if(!fecha_creacion.equals(material.getFecha_creacion())){                
                salida+="Fecha Creacion:    " + material.getFecha_creacion() + 
                        "    ---->    " + fecha_creacion + "\n";
                controlador.modificarMaterial(3, codigo, fecha_creacion);
            }            
            if(!fecha_publicacion.equals(material.getFecha_creacion())){
                salida+="Fecha Publicaciob:    " + material.getFecha_creacion() + 
                        "    ---->    " + fecha_publicacion + "\n";
                controlador.modificarMaterial(4, codigo, fecha_publicacion);
            }
            if(!idioma.equals(material.getIdioma())){                
                salida+="Idioma:    " + material.getIdioma() + 
                        "    ---->    " + idioma + "\n";
                controlador.modificarMaterial(5, codigo, idioma);
            }
            if(!formato.equals(material.getFormato())){                
                salida+="Formato:    " + material.getFormato() + 
                        "    ---->    " + formato + "\n";
                controlador.modificarMaterial(6, codigo, formato);
            } 
            if(!editorial.equals(material.getEditorial())){                
                salida+="Editorial:    " + material.getEditorial() + 
                        "    ---->    " + editorial + "\n";
                controlador.modificarMaterial(7, codigo, editorial);
            }
            if(!descripcion.equals(material.getDescripcion())){               
                salida+="Descripcion:    " + material.getDescripcion() + 
                        "    ---->    " + descripcion + "\n";
                controlador.modificarMaterial(8, codigo, descripcion);
            }
            if(!salida.equals("")) 
            JOptionPane.showMessageDialog(this, "Al Material con codigo : " + codigo  
                    +"se le realizó la siguiente modificacion:"  
                    + "\n\n"+ salida);
            
            jTFCodigo2.setText("");
            jTFTituloPri2.setText("");
            jTFTituloSec2.setText("");
            jCBDiaCreacion2.setSelectedIndex(0);
            jCBMesCreacion2.setSelectedIndex(0);
            jCBAnioCreacion2.setSelectedIndex(0);
            jCBIdioma2.setSelectedIndex(0);
            jTFEditorial2.setText("");
            jCBDianPublicacion2.setSelectedIndex(0);
            jCBMesPublicacion2.setSelectedIndex(0);
            jCBAnioPublicacion2.setSelectedIndex(0);
            jTFCodigo4.setText("");
            jTFCodigo3.setText("");
            jTFCodigo5.setText("");
            jTADescripcion2.setText("");
            jTFCodigo2.setEditable(true);
            jTFTituloPri2.setEditable(false);
            jTFTituloSec2.setEditable(false);
            jCBDiaCreacion2.setEnabled(false);
            jCBMesCreacion2.setEnabled(false);
            jCBAnioCreacion2.setEnabled(false);
            jCBIdioma2.setEnabled(false);
            jTFEditorial2.setEditable(false);
            jCBDianPublicacion2.setEnabled(false);
            jCBMesPublicacion2.setEnabled(false);
            jCBAnioPublicacion2.setEnabled(false);
            jTADescripcion2.setEditable(false);
            jTADescripcion2.setOpaque(false);
            jBGuardar1.setEnabled(false);           
            jBModificar1.setEnabled(true);            
        } else
            JOptionPane.showMessageDialog(this, mensaje, "Error de Catalogacion",
                    JOptionPane.ERROR_MESSAGE);       
}//GEN-LAST:event_jBGuardar1ActionPerformed

    private void jTFTituloPri2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTFTituloPri2ActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jTFTituloPri2ActionPerformed

    private void jTFCodigo2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTFCodigo2ActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jTFCodigo2ActionPerformed

    private void jTFTipo1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTFTipo1ActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jTFTipo1ActionPerformed

    private void jBCatalogarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBCatalogarActionPerformed
        // TODO add your handling code here:
        ControladorMaterial cont_mat= new ControladorMaterial();       
                
        if(datosValidos()){
            String codigo = jTFCodigo1.getText();
            String titulo_pri = jTFTituloPri1.getText();
            String titulo_sec = jTFTituloSec1.getText();
            String fec_creacion = anioCreacion+"-"+mesCreacion+"-"+diaCreacion;
            String fec_publicacion = anioPublicacion+"-"+mesPublicacion+"-"+diaPublicacion;            
            String idioma = String.valueOf(jCBIdioma1.getSelectedItem());
            String editorial = jTEditorial1.getText();
            String descripcion = jTADescripcion1.getText();
            String codigo_tipo = jTFTipo1.getText();
            String catalogador= jTFCatalogador1.getText();
            
            cont_mat.insertarDocumento(codigo, titulo_pri, titulo_sec, fec_creacion, 
                    fec_publicacion, idioma, formato, editorial,descripcion, 
                    codigo_tipo, catalogador, "src/materiales/" + codigo +"." + 
                    formato, tamanoArchivo);
            System.out.println("Material catalogado");
            guardarArchivo(codigo, formato);
            System.out.println("Archivo Material guaradado");        
            if(dialogoAgregarAutores != null 
                    && !dialogoAgregarAutores.getListaCodigos().isEmpty()){                
                               
                for(int i=0; i<dialogoAgregarAutores.getListaCodigos().size(); i++){
                    cont_mat.agregarAutor(codigo, 
                            (String)dialogoAgregarAutores.getListaCodigos().elementAt(i));
                }
            }
            
            guardarAreasAgregadas(codigo);
            
            if(dialogoAgregarPalabras != null 
                    && !dialogoAgregarPalabras.getListaCodigos().isEmpty()){                
                               
                for(int i=0; i<dialogoAgregarPalabras.getListaCodigos().size(); i++){
                    cont_mat.agregarPalabra(codigo, 
                            (String)dialogoAgregarPalabras.getListaCodigos().elementAt(i));
                }
            }
            
            Material mat = cont_mat.retornarMaterial(codigo);
            System.out.println(mat.mostrarmeEnPantalla());
            mensajeExitoCatalogacion(mat);
                              
            jTFCodigo1.setText("");
            jTFTituloPri1.setText("");
            jTFTituloSec1.setText("");
            jCBIdioma1.setSelectedIndex(0);
            jTEditorial1.setText("");
            jTADescripcion1.setText("");
            jTFCatalogador1.setText("");
            jTFTipo1.setText("");
            jCBDiaCreacion1.setSelectedIndex(0);
            jCBMesCreacion1.setSelectedIndex(0);
            jCBAnioCreacion1.setSelectedIndex(0);
            jCBDiaPublicacion1.setSelectedIndex(0);
            jCBMesPublicacion1.setSelectedIndex(0);
            jCBAnioPublicacion1.setSelectedIndex(0);
            dialogoAgregarAutores=null;
            dialogoAgregarAreas=null;
            dialogoAgregarPalabras=null;
        }
        else{
            JOptionPane.showMessageDialog(this, mensaje, "Error de catalogacion",
                    JOptionPane.ERROR_MESSAGE);
        }
}//GEN-LAST:event_jBCatalogarActionPerformed

    private void jTFCatalogador1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTFCatalogador1ActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jTFCatalogador1ActionPerformed

    private void jTFTituloPri1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTFTituloPri1ActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jTFTituloPri1ActionPerformed

    private void jTFCodigo1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTFCodigo1ActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jTFCodigo1ActionPerformed

    private void jBGuardarCatalogadorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBGuardarCatalogadorActionPerformed
        // TODO add your handling code here:
        ControladorMaterial controlador= new ControladorMaterial();
        ControladorUsuario cont_catlogador = new ControladorUsuario();
        boolean completo = true;
                
        mensaje = "Hay errores en la modificacion del Tipo del Material:     " + "\n\n";        
        if(jTFCatalogador2.getText().equals("")){
            completo = false;
            mensaje += "-> El campo Codigo del Ctalogador está vacío." + "\n";
        }
        if(!jTFCatalogador2.getText().equals("")
                && cont_catlogador.existeCodigo(jTFCatalogador2.getText())
                && !cont_catlogador.retornarUsuarioPorCodigo
                (jTFCatalogador2.getText()).getTipoUsuario().equals("1")){
            completo = false;
            mensaje += "-> El Codigo ingresado no corresponde a un CATALOGADOR." + "\n";
        }
        
        if(completo){
            String  codigo = jTFCodigo4.getText();
            String  catalogador = jTFCatalogador2.getText();
            String salida = "";
            
            if(!catalogador.equals(campo)){
                Usuario aux = cont_catlogador.retornarUsuarioPorCodigo(catalogador);                
                controlador.modificarMaterial(10, codigo, catalogador);
                catalogador += ": " + aux.getNombre()+" "+ aux.getApellido();
                salida+="Tipo de Material:    " + campo + "    ---->    " + catalogador + "\n";
            }            
            if(!salida.equals("")) 
            JOptionPane.showMessageDialog(this, "Al Material con codigo : " + codigo  
                    +" se le realizara la siguiente modificacion:"  
                    + "\n\n"+ salida);
            
            jTFCodigo4.setEditable(true);
            jTFCodigo4.setText("");
            jTFCatalogador2.setEditable(false);
            jTFCatalogador2.setText("");
            jBGuardarCatalogador.setEnabled(false);
            jBModificarCatlogador.setEnabled(true);
            
            campo = "";
            
        } else{
            JOptionPane.showMessageDialog(this, mensaje, "Error de registro",
                    JOptionPane.ERROR_MESSAGE);
        }    
}//GEN-LAST:event_jBGuardarCatalogadorActionPerformed

    private void jTFCatalogador2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTFCatalogador2ActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jTFCatalogador2ActionPerformed

    private void jTFCodigo4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTFCodigo4ActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jTFCodigo4ActionPerformed

    private void jTFCodigo3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTFCodigo3ActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jTFCodigo3ActionPerformed

    private void jBGuardarTipoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBGuardarTipoActionPerformed
        // TODO add your handling code here:
        ControladorMaterial controlador= new ControladorMaterial();
        ControladorTipoMaterial cont_tipo = new ControladorTipoMaterial();
        boolean completo = true;
                
        mensaje = "Hay errores en la modificacion del Tipo del Material:     " + "\n\n";        
        if(jTFTipo2.getText().equals("")){
            completo = false;
            mensaje += "-> El campo Codigo Tipo está vacío." + "\n";
        }
        
        if(completo){
            String  codigo = jTFCodigo3.getText();
            String  tipo = jTFTipo2.getText();
            String salida = "";
            
            if(!tipo.equals(campo)){
                Vector aux = cont_tipo.consultarTipo(tipo);                
                controlador.modificarMaterial(9, codigo, tipo);
                tipo += ": " + aux.elementAt(1);
                salida+="Tipo de Material:    " + campo + "    ---->    " + tipo + "\n";
            }            
            if(!salida.equals("")) 
            JOptionPane.showMessageDialog(this, "Al Material con codigo : " + codigo  
                    +" se le realizara la siguiente modificacion:"  
                    + "\n\n"+ salida);
            
            jTFCodigo3.setEditable(true);
            jTFCodigo3.setText("");
            jTFTipo2.setEditable(false);
            jTFTipo2.setText("");
            jBGuardarTipo.setEnabled(false);
            jBModificarTipo.setEnabled(true);
            
            campo = "";
            
        } else{
            JOptionPane.showMessageDialog(this, mensaje, "Error de registro",
                    JOptionPane.ERROR_MESSAGE);
        }    
}//GEN-LAST:event_jBGuardarTipoActionPerformed

    private void jTFTipo2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTFTipo2ActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jTFTipo2ActionPerformed

    private void jTEditorial1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTEditorial1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jTEditorial1ActionPerformed

    private void jBLimpiarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBLimpiarActionPerformed
        // TODO add your handling code here:
        jTFCodigo1.setText("");
        jTFTituloPri1.setText("");
        jTFTituloSec1.setText("");
        jCBDiaCreacion1.setSelectedIndex(0);
        jCBMesCreacion1.setSelectedIndex(0);
        jCBAnioCreacion1.setSelectedIndex(0);
        jCBDiaPublicacion1.setSelectedIndex(0);
        jCBMesPublicacion1.setSelectedIndex(0);
        jCBAnioPublicacion1.setSelectedIndex(0);
        jCBIdioma1.setSelectedIndex(0);
        jTEditorial1.setText("");
        jTADescripcion1.setText("");
        jTFCatalogador1.setText("");
        jTFTipo1.setText("");
        dialogoAgregarAutores.limpiarLista2();
        dialogoAgregarAreas.limpiarLista2();
        dialogoAgregarPalabras.limpiarLista2();
    }//GEN-LAST:event_jBLimpiarActionPerformed

    private void jBModificar1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBModificar1ActionPerformed
        // TODO add your handling code here:
        ControladorMaterial controlador= new ControladorMaterial();
        boolean completo = true;
        int respuesta=-1;     
                
        mensaje = "Se presentaron los siguientes errores:     " + "\n\n";
        if(jTFCodigo2.getText().equals("")){
            completo = false;
            mensaje += "-> El campo Codigo está vacío." + "\n";
        }
        if(completo && !controlador.existeCodigo(jTFCodigo2.getText())){
            completo = false;
            mensaje += "-> El Codigo ingresado no existe." + "\n";
        }
        if(completo){
        material = controlador.retornarMaterial(jTFCodigo2.getText());
            respuesta = JOptionPane.showConfirmDialog(this, "¿Esta seguro "
                    + "que desea modificar el Material " + material.mostrarmeEnPantalla() +"?");
        }
        if(!completo){
            JOptionPane.showMessageDialog(this, mensaje, "Error en modificacion",
                    JOptionPane.ERROR_MESSAGE);
        }        
        if(completo && respuesta == JOptionPane.YES_OPTION){
            llenarFormularioModificacion();
        }
        
        if(respuesta == JOptionPane.NO_OPTION){
            jTFCodigo2.setText("");
            material = null;
        }
    }//GEN-LAST:event_jBModificar1ActionPerformed

    private void jBAddAuotres1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBAddAuotres1ActionPerformed
        // TODO add your handling code here:
        if(dialogoAgregarAutores == null){
            dialogoAgregarAutores = new AddAutoresMaterial(null, true);
            dialogoAgregarAutores.setCaso(1);
            dialogoAgregarAutores.setVisible(true);
        }
        else
            dialogoAgregarAutores.setVisible(true);
        
    }//GEN-LAST:event_jBAddAuotres1ActionPerformed

    private void jBAddAreas1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBAddAreas1ActionPerformed
        // TODO add your handling code here:
        agregarQuitarAreas(1);
    }//GEN-LAST:event_jBAddAreas1ActionPerformed

    private void jBAddPalabras1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBAddPalabras1ActionPerformed
        // TODO add your handling code here:
        if(dialogoAgregarPalabras == null){
            dialogoAgregarPalabras = new AddPalabraMaterial(null, true);
            dialogoAgregarPalabras.setCaso(1);
            dialogoAgregarPalabras.setVisible(true); 
        }
        else
            dialogoAgregarPalabras.setVisible(true);
    }//GEN-LAST:event_jBAddPalabras1ActionPerformed

    private void jBAddAuotres2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBAddAuotres2ActionPerformed
        // TODO add your handling code here:
        dialogoAgregarAutores = new AddAutoresMaterial(null, true);
        dialogoAgregarAutores.llenarListaDos(jTFCodigo5.getText());
        dialogoAgregarAutores.setCaso(2);
        dialogoAgregarAutores.setVisible(true);         
    }//GEN-LAST:event_jBAddAuotres2ActionPerformed

    private void jTFCodigo5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTFCodigo5ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jTFCodigo5ActionPerformed

    private void jBModificarAdicionalesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBModificarAdicionalesActionPerformed
        // TODO add your handling code here:
        ControladorMaterial controlador= new ControladorMaterial();
        boolean completo = true;
        int respuesta=-1;     
                
        mensaje = "Se presentaron los siguientes errores:     " + "\n\n";
        if(jTFCodigo5.getText().equals("")){
            completo = false;
            mensaje += "-> El campo Codigo está vacío." + "\n";
        }
        if(completo && !controlador.existeCodigo(jTFCodigo5.getText())){
            completo = false;
            mensaje += "-> El Codigo ingresado no existe." + "\n";
        }
        if(completo){
        material = controlador.retornarMaterial(jTFCodigo5.getText());
            respuesta = JOptionPane.showConfirmDialog(this, "¿Esta seguro "
                    + "que desea modificar el Material " + material.mostrarmeEnPantalla() +"?");
        }
        if(!completo){
            JOptionPane.showMessageDialog(this, mensaje, "Error en modificacion",
                    JOptionPane.ERROR_MESSAGE);
        }        
        if(completo && respuesta == JOptionPane.YES_OPTION){
            jTFCodigo5.setEditable(false);
            jBModificarAdicionales.setEnabled(false);
            jBAddAuotres2.setEnabled(true);
            jBAddAreas2.setEnabled(true);
            jBAddPalabras2.setEnabled(true);
            jBModificarOtros.setEnabled(true);
        }
        
        if(respuesta == JOptionPane.NO_OPTION){
            jTFCodigo5.setText("");
            material = null;
        }
    }//GEN-LAST:event_jBModificarAdicionalesActionPerformed

    private void jBModificarTipoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBModificarTipoActionPerformed
        // TODO add your handling code here:
        ControladorMaterial controlador= new ControladorMaterial();
        boolean completo = true;
        int respuesta=-1;
        Material m= new Material();
        
        mensaje = "Se presentaron los siguientes errores:     " + "\n\n";
        if(jTFCodigo3.getText().equals("")){
            completo = false;
            mensaje += "-> El campo Codigo del Material está vacío." + "\n";
        }
        if(completo && !controlador.existeCodigo(jTFCodigo3.getText())){
            completo = false;
            mensaje += "-> El Codigo del Material ingresado no existe." + "\n";
        }
        if(completo){
        m = controlador.retornarMaterial(jTFCodigo3.getText());
            respuesta = JOptionPane.showConfirmDialog(this, "¿Esta seguro "
                    + "que desea modificar el Material " + m.mostrarmeEnPantalla()+ "?");
        }
        if(!completo){
            JOptionPane.showMessageDialog(this, mensaje, "Error en modificacion",
                    JOptionPane.ERROR_MESSAGE);
        }        
        if(completo && respuesta == JOptionPane.YES_OPTION){
            jTFCodigo3.setEditable(false);
            jTFTipo2.setEditable(true);
            jTFTipo2.setText(m.getTipo_mat().getCodigo());
            jBGuardarTipo.setEnabled(true);
            jBModificarTipo.setEnabled(false);            
            campo = jTFTipo2.getText();
        }
        
        if(respuesta == JOptionPane.NO_OPTION){
            jTFCodigo3.setEditable(true);
            jTFCodigo3.setText("");
            jTFTipo2.setEditable(false);
            jTFTipo2.setText("");
            jBModificarTipo.setEnabled(false);
            jBGuardarTipo.setEnabled(true);
            campo = "";
        }
    }//GEN-LAST:event_jBModificarTipoActionPerformed

    private void jBModificarOtrosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBModificarOtrosActionPerformed
        // TODO add your handling code here:
        jBModificarOtros.setEnabled(false);
        jTFCodigo5.setEditable(true);
        jTFCodigo5.setText("");
        jBModificarAdicionales.setEnabled(true);
        jBAddAuotres2.setEnabled(false);
        jBAddAreas2.setEnabled(false);
        jBAddPalabras2.setEnabled(false);
    }//GEN-LAST:event_jBModificarOtrosActionPerformed

    private void jBAddAreas2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBAddAreas2ActionPerformed
        // TODO add your handling code here:
        dialogoAgregarAreas = new AddAreasMaterial(null, true);
        dialogoAgregarAreas.setCaso(2);
        dialogoAgregarAreas.llenarListaDos(jTFCodigo5.getText());        
        dialogoAgregarAreas.setVisible(true);
    }//GEN-LAST:event_jBAddAreas2ActionPerformed

    private void jBAddPalabras2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBAddPalabras2ActionPerformed
        // TODO add your handling code here:
        dialogoAgregarPalabras = new AddPalabraMaterial(null, true);
        dialogoAgregarPalabras.llenarListaDos(jTFCodigo5.getText());
        dialogoAgregarPalabras.setCaso(2);
        dialogoAgregarPalabras.setVisible(true);
    }//GEN-LAST:event_jBAddPalabras2ActionPerformed

    private void jButton20ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton20ActionPerformed
        // TODO add your handling code here:
        jTFCodigo2.setText("");
        jTFTituloPri2.setText("");
        jTFTituloSec2.setText("");
        jCBDiaCreacion2.setSelectedIndex(0);
        jCBMesCreacion2.setSelectedIndex(0);
        jCBAnioCreacion2.setSelectedIndex(0);
        jCBIdioma2.setSelectedIndex(0);
        jTFEditorial2.setText("");
        jCBDianPublicacion2.setSelectedIndex(0);
        jCBMesPublicacion2.setSelectedIndex(0);
        jCBAnioPublicacion2.setSelectedIndex(0);
        jTFCodigo4.setText("");
        jTFCodigo3.setText("");
        jTFCodigo5.setText("");
        jTADescripcion2.setText("");
        jTFCodigo2.setEditable(true);
        jTFTituloPri2.setEditable(false);
        jTFTituloSec2.setEditable(false);
        jCBDiaCreacion2.setEnabled(false);
        jCBMesCreacion2.setEnabled(false);
        jCBAnioCreacion2.setEnabled(false);
        jCBIdioma2.setEnabled(false);
        jTFEditorial2.setEditable(false);
        jCBDianPublicacion2.setEnabled(false);
        jCBMesPublicacion2.setEnabled(false);
        jCBAnioPublicacion2.setEnabled(false);
        jTFCodigo4.setEditable(true);
        jTFCodigo3.setEditable(true);
        jTFCodigo5.setEditable(true);
        jTADescripcion2.setEditable(false);
        jTADescripcion2.setOpaque(false);
        jBAddAreas2.setEnabled(false);
        jBAddAuotres2.setEnabled(false);
        jBAddPalabras2.setEnabled(false);
        jBModificarAdicionales.setEnabled(true);
        jBModificarOtros.setEnabled(false);
        jBGuardarTipo.setEnabled(false);
        jBGuardar1.setEnabled(false);
        jBGuardarCatalogador.setEnabled(false);
        jBModificar1.setEnabled(true);
        jBModificarCatlogador.setEnabled(true);
        jBModificarTipo.setEnabled(true);
    }//GEN-LAST:event_jButton20ActionPerformed

    private void jCBDianPublicacion2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCBDianPublicacion2ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jCBDianPublicacion2ActionPerformed

    private void jCBDiaCreacion2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCBDiaCreacion2ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jCBDiaCreacion2ActionPerformed

    private void jCBMesCreacion2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCBMesCreacion2ActionPerformed
        // TODO add your handling code here:
        if(jCBMesCreacion2.getSelectedIndex() != 0){
            String lista[] = escogerListaDias(String.valueOf(jCBMesCreacion2.getSelectedItem()));
            jCBDiaCreacion2.removeAllItems();
            for(int i=0; i<lista.length; i++)
                jCBDiaCreacion2.addItem(lista[i]);
            jCBDiaCreacion2.setEnabled(true);
        }
    }//GEN-LAST:event_jCBMesCreacion2ActionPerformed

    private void jCBAnioCreacion2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCBAnioCreacion2ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jCBAnioCreacion2ActionPerformed

    private void jBDesactivarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBDesactivarActionPerformed
        // TODO add your handling code here:
        desactivarMaterial();
    }//GEN-LAST:event_jBDesactivarActionPerformed

    private void jBModificarCatlogadorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBModificarCatlogadorActionPerformed
        // TODO add your handling code here:
        ControladorMaterial controlador= new ControladorMaterial();
        boolean completo = true;
        int respuesta=-1;
        Material m= new Material();
        
        mensaje = "Se presentaron los siguientes errores:     " + "\n\n";
        if(jTFCodigo4.getText().equals("")){
            completo = false;
            mensaje += "-> El campo Codigo del Material está vacío." + "\n";
        }
        if(completo && !controlador.existeCodigo(jTFCodigo4.getText())){
            completo = false;
            mensaje += "-> El Codigo del Material ingresado no existe." + "\n";
        }
        if(completo){
        m = controlador.retornarMaterial(jTFCodigo4.getText());
            respuesta = JOptionPane.showConfirmDialog(this, "¿Esta seguro "
                    + "que desea modificar el Material " + m.mostrarmeEnPantalla()+ "?");
        }
        if(!completo){
            JOptionPane.showMessageDialog(this, mensaje, "Error en modificacion",
                    JOptionPane.ERROR_MESSAGE);
        }        
        if(completo && respuesta == JOptionPane.YES_OPTION){
            jTFCodigo4.setEditable(false);
            jTFCatalogador2.setEditable(true);
            jTFCatalogador2.setText(m.getCatalogador().getCodigo());
            jBGuardarCatalogador.setEnabled(true);
            jBModificarCatlogador.setEnabled(false);            
            campo = jTFCatalogador2.getText();
        }
        
        if(respuesta == JOptionPane.NO_OPTION){
            jTFCodigo4.setEditable(true);
            jTFCodigo4.setText("");
            jTFCatalogador2.setEditable(false);
            jTFCatalogador2.setText("");
            jBGuardarCatalogador.setEnabled(false);
            jBModificarCatlogador.setEnabled(true);
            campo = "";
        }
    }//GEN-LAST:event_jBModificarCatlogadorActionPerformed

    private void jTFCodigo7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jTFCodigo7ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jTFCodigo7ActionPerformed

    private void jBActivarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBActivarActionPerformed
        // TODO add your handling code here:
        ControladorMaterial control = new ControladorMaterial();
        Material m = new Material();
        int respuesta = -1;
        boolean completo = true;
                
        mensaje = "Hay errores en la activación del Material:     " + "\n\n"; 
        if(jTFCodigo7.getText().equals("")){
            completo = false;
            mensaje += "-> El campo Codigo del Material está vacío." + "\n";
        }
        if(completo && !control.existeCodigo(jTFCodigo7.getText())){
            completo = false;
            mensaje += "-> El Codigo del Material ingresado no existe." + "\n";
        }
        if(completo && control.esActivado(jTFCodigo7.getText())){
            completo = false;
            mensaje += "-> El Material con el codigo ingresado está activado." + "\n";
        }
        if(completo){
            m = control.retornarMaterial(jTFCodigo7.getText());
            respuesta = JOptionPane.showConfirmDialog(this, "¿Esta seguro "
                    + "que desea activar el Material " + m.mostrarmeEnPantalla() + "?");
            
            if(respuesta == JOptionPane.YES_OPTION){
                control.activarMaterial(jTFCodigo7.getText());
                JOptionPane.showMessageDialog(this, "El Material ha sido activado");
                jTFCodigo7.setText("");
            }
            
        } else{
            JOptionPane.showMessageDialog(this, mensaje, "Error de activación",
                    JOptionPane.ERROR_MESSAGE);
        }
    }//GEN-LAST:event_jBActivarActionPerformed

    private void jBCancelarActivacionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBCancelarActivacionActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jBCancelarActivacionActionPerformed

    private void jBCargarArchivoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBCargarArchivoActionPerformed
        // TODO add your handling code here:
        cargarArchivo();
    }//GEN-LAST:event_jBCargarArchivoActionPerformed

    private void jCBDiaPublicacion1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCBDiaPublicacion1ActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jCBDiaPublicacion1ActionPerformed

    private void jCBDiaCreacion1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCBDiaCreacion1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jCBDiaCreacion1ActionPerformed

    private void jCBMesCreacion1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCBMesCreacion1ActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jCBMesCreacion1ActionPerformed

    private void jCBAnioCreacion1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCBAnioCreacion1ActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jCBAnioCreacion1ActionPerformed

    private void jCBMesCreacion1ItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jCBMesCreacion1ItemStateChanged
        // TODO add your handling code here:
        if(jCBMesCreacion1.getSelectedIndex() != 0){
            String lista[] = escogerListaDias(String.valueOf(jCBMesCreacion1.getSelectedItem()));
            jCBDiaCreacion1.removeAllItems();
            for(int i=0; i<lista.length; i++)
                jCBDiaCreacion1.addItem(lista[i]);
            jCBDiaCreacion1.setEnabled(true);
        }
    }//GEN-LAST:event_jCBMesCreacion1ItemStateChanged

    private void jCBMesPublicacion1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCBMesPublicacion1ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jCBMesPublicacion1ActionPerformed

    private void jCBMesPublicacion1ItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jCBMesPublicacion1ItemStateChanged
        // TODO add your handling code here:
        if(jCBMesPublicacion1.getSelectedIndex() != 0){
            String lista[] = escogerListaDias(String.valueOf(jCBMesPublicacion1.getSelectedItem()));
            jCBDiaPublicacion1.removeAllItems();
            for(int i=0; i<lista.length; i++)
                jCBDiaPublicacion1.addItem(lista[i]);
            jCBDiaPublicacion1.setEnabled(true);
        }       
    }//GEN-LAST:event_jCBMesPublicacion1ItemStateChanged

    private void jCBMesPublicacion2ItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jCBMesPublicacion2ItemStateChanged
        // TODO add your handling code here:
        if(jCBMesPublicacion1.getSelectedIndex() != 0){
            String lista[] = escogerListaDias(String.valueOf(jCBMesPublicacion1.getSelectedItem()));
            jCBDiaPublicacion1.removeAllItems();
            for(int i=0; i<lista.length; i++)
                jCBDiaPublicacion1.addItem(lista[i]);
            jCBDiaPublicacion1.setEnabled(true);
        }   
    }//GEN-LAST:event_jCBMesPublicacion2ItemStateChanged
   
    public boolean modificacionValida(){
        boolean completo = true;                
        mensaje = "Hay errores en la modificacion del Material:     " + "\n\n";        
        if(jTFTituloPri2.getText().equals("")){
            completo = false;
            mensaje += "-> El campo Titulo Principal está vacío." + "\n";
        }
        if(jTFTituloSec2.getText().equals("")){
            completo = false;
            mensaje += "-> El campo Titulo Secundario está vacío." + "\n";
        }
        diaCreacion = jCBDiaCreacion2.getSelectedItem().toString();
        System.out.println(diaCreacion);
        if(diaCreacion.equals("Dia:")){
            completo = false;
            mensaje += "-> Debe elegir un Dia para la Fecha de Creacion está vacío." + "\n";
        }
        mesCreacion = jCBMesCreacion2.getSelectedItem().toString();
        System.out.println(mesCreacion);
        if(mesCreacion.equals("Mes:")){
            completo = false;
            mensaje += "-> Debe elegir un Mes para la Fecha de Creacion está vacío." + "\n";
        }
        anioCreacion = jCBAnioCreacion2.getSelectedItem().toString();
        System.out.println(anioCreacion);
        if(anioCreacion.equals("Anio:")){
            completo = false;
            mensaje += "-> Debe elegir un Anio para la Fecha de Creacion está vacío." + "\n";
        }
        diaPublicacion = jCBDianPublicacion2.getSelectedItem().toString();
        System.out.println(diaPublicacion);
        if(diaPublicacion.equals("Dia:")){
            completo = false;
            mensaje += "-> Debe elegir un Dia para la Fecha de Publicacion está vacío." + "\n";
        }
        mesPublicacion = jCBMesPublicacion2.getSelectedItem().toString();
        System.out.println(mesPublicacion);
        if(mesPublicacion.equals("Mes:")){
            completo = false;
            mensaje += "-> Debe elegir un Mes para la Fecha de Publicacion está vacío." + "\n";
        }
        anioPublicacion = jCBAnioPublicacion2.getSelectedItem().toString();
        System.out.println(anioPublicacion);
        if(anioPublicacion.equals("Anio:")){
            completo = false;
            mensaje += "-> Debe elegir un Anio para la Fecha de Publicacion está vacío." + "\n";
        }
        if(jCBIdioma2.getSelectedIndex() == 0){
            completo = false;
            mensaje += "-> Debe escoger el Idioma." + "\n";
        }
        if(jTFEditorial2.getText().equals("")){
            completo = false;
            mensaje += "-> El campo Editorial está vacío." + "\n";
        }
        if(jTADescripcion2.getText().equals("")){
            completo = false;
            mensaje += "-> El campo Descripcion está vacío." + "\n";
        }
        return completo;
    }
    
    public boolean datosValidos(){
        ControladorMaterial cont_mat= new ControladorMaterial();
        ControladorUsuario cont_usr= new ControladorUsuario();
        ControladorTipoMaterial cont_tip = new ControladorTipoMaterial();
        
        boolean completo = true;        
        mensaje = "Hay errores en el registro del Material:     " + "\n\n";
        if(jTFCodigo1.getText().equals("")){
            completo = false;
            mensaje += "-> El campo Codigo está vacío." + "\n";
        }
        if(completo && cont_mat.existeCodigo(jTFCodigo1.getText())){
            completo = false;
            mensaje += "-> El Codigo ingresado ya existe." + "\n";
        }
        if(jTFTituloPri1.getText().equals("")){
            completo = false;
            mensaje += "-> El campo Titulo Principal está vacío." + "\n";
        }
        if(jTFTituloSec1.getText().equals("")){
            completo = false;
            mensaje += "-> El campo Titulo Secundario está vacío." + "\n";
        }
        diaCreacion = jCBDiaCreacion1.getSelectedItem().toString();
        if(diaCreacion.equals("Dia:")){
            completo = false;
            mensaje += "-> Debe elegir un Dia para la Fecha de Creacion está vacío." + "\n";
        }
        mesCreacion = jCBMesCreacion1.getSelectedItem().toString();
        if(mesCreacion.equals("Mes:")){
            completo = false;
            mensaje += "-> Debe elegir un Mes para la Fecha de Creacion está vacío." + "\n";
        }
        anioCreacion = jCBAnioCreacion1.getSelectedItem().toString();
        if(anioCreacion.equals("Anio:")){
            completo = false;
            mensaje += "-> Debe elegir un Anio para la Fecha de Creacion está vacío." + "\n";
        }
        diaPublicacion = jCBDiaPublicacion1.getSelectedItem().toString();
        if(diaPublicacion.equals("Dia:")){
            completo = false;
            mensaje += "-> Debe elegir un Dia para la Fecha de Publicacion está vacío." + "\n";
        }
        mesPublicacion = jCBMesPublicacion1.getSelectedItem().toString();
        if(mesPublicacion.equals("Mes:")){
            completo = false;
            mensaje += "-> Debe elegir un Mes para la Fecha de Publicacion está vacío." + "\n";
        }
        anioPublicacion = jCBAnioPublicacion1.getSelectedItem().toString();
        if(anioPublicacion.equals("Anio:")){
            completo = false;
            mensaje += "-> Debe elegir un Anio para la Fecha de Publicacion está vacío." + "\n";
        }
        if(jCBIdioma1.getSelectedIndex()== 0){
            completo = false;
            mensaje += "-> Debe escoger el Idioma." + "\n";
        }
        if(jTEditorial1.getText().equals("")){
            completo = false;
            mensaje += "-> El campo Editorial está vacío." + "\n";
        }
        if(jTADescripcion1.getText().equals("")){
            completo = false;
            mensaje += "-> El area para la  Descripcion del Archivo está vacía." + "\n";
        }
        if(!archivoCargado){
            completo = false;
            mensaje += "-> Debe cargar el archivo del Material." + "\n";
        }
        if(jTFCatalogador1.getText().equals("")){
            completo = false;
            mensaje += "-> El campo Codigo de Catalogador está vacío." + "\n";
        }        
        if(!jTFCatalogador1.getText().equals("")
                && !cont_usr.existeCodigo(jTFCatalogador1.getText())){
            completo = false;
            mensaje += "-> El Codigo del CATALOGADOR ingresado no existe." + "\n";
        }
        if(!jTFCatalogador1.getText().equals("")
                && cont_usr.existeCodigo(jTFCatalogador1.getText())
                && !cont_usr.retornarUsuarioPorCodigo
                (jTFCatalogador1.getText()).getTipoUsuario().equals("1")){
            completo = false;
            mensaje += "-> El Codigo ingresado no corresponde a un CATALOGADOR." + "\n";
        }
        if(jTFTipo1.getText().equals("")){
            completo = false;
            mensaje += "-> El campo Codigo de Tipo de Material está vacío." + "\n";
        }
        if(!jTFTipo1.getText().equals("") && 
                !cont_tip.existeCodigo(jTFTipo1.getText())){
            completo = false;
            mensaje += "-> El Codigo de Tipo Material ingresado no existe." + "\n";
        }
        
        return completo;
    }
    
    public void llenarFormularioModificacion(){
        jTFCodigo2.setEditable(false);
        jTFTituloPri2.setEditable(true);
        jTFTituloPri2.setText(material.getTitulo_pri());
        jTFTituloSec2.setEditable(true);
        jTFTituloSec2.setText(material.getTitulo_sec());
        String fecha_creacion[] = new String [3];
        StringTokenizer guion  = new StringTokenizer(material.getFecha_creacion(), "-");
        for(int i=0; i<3; i++){ 
            if(guion.hasMoreTokens()){
                String aux=guion.nextToken();
                fecha_creacion[i]=(aux);                    
            }  
        } 
        llenarListasDias();
        jCBAnioCreacion2.setSelectedItem(fecha_creacion[0]);
        jCBMesCreacion2.setSelectedItem(fecha_creacion[1]);                  
        jCBDiaCreacion2.setEnabled(true);         
        jCBDiaCreacion2.setSelectedItem(fecha_creacion[2]); 
        jCBMesCreacion2.setEnabled(true);
        jCBAnioCreacion2.setEnabled(true);

        String fecha_publicacion[] = new String [3];
        StringTokenizer guion2  = new StringTokenizer(material.getFecha_publicacion(), "-");
        for(int i=0; i<3; i++){ 
            if(guion2.hasMoreTokens()){
                String aux=guion2.nextToken();
                fecha_publicacion[i]=(aux);
            }  
        }
        jCBAnioPublicacion2.setSelectedItem(fecha_publicacion[0]);        
        jCBMesPublicacion2.setSelectedItem(fecha_publicacion[1]);
        jCBDianPublicacion2.setSelectedItem(fecha_publicacion[2]);
        jCBDianPublicacion2.setEnabled(true);
        jCBMesPublicacion2.setEnabled(true);
        jCBAnioPublicacion2.setEnabled(true);
        jCBIdioma2.setEnabled(true);
        jCBIdioma2.setSelectedItem(material.getIdioma());
        jTFEditorial2.setEditable(true);
        jTFEditorial2.setText(material.getEditorial());
        jTADescripcion2.setEditable(true);
        jTADescripcion2.setOpaque(true);
        jTADescripcion2.setText(material.getDescripcion());
        jBModificar1.setEnabled(false);
        jBGuardar1.setEnabled(true);
    }
    
    public void mensajeExitoCatalogacion(Material m){        

        JOptionPane.showMessageDialog(this, "El Material fue catalogado con "
                + "éxito y con la siguiente informacion:"+ 
                "\n\nCODIGO: "+ m.getCodigo() +
                "\nTITULO PRINCIPAL: "+ m.getTitulo_pri()+
                "\nTITULO SECUNDARIO: "+ m.getTitulo_sec()+
                "\nFECHA DE CREACION: "+ m.getFecha_creacion()+
                "\nFECHA DE PUBLICACION: "+ m.getFecha_publicacion()+
                "\nIDIOMA: "+ m.getIdioma()+
                "\nFORMATO: "+ m.getFormato()+
                "\nEDITORIAL: "+ m.getEditorial()+
                "\nRUTA DEL ARCHIVO: "+ m.getRuta()+
                "\nTAMAÑO DEL ARCHIVO: "+ m.getTamano()+" Bytes"+
                "\nDESCRIPCION: "+ m.getDescripcion()+
                "\nTIPO MATERIAL: "+ m.getTipo_mat().mostrarmeEnPantalla()+
                "\nCATALOGADOR: "+ m.getCatalogador().mostrarmeEnPantalla());  
    }
    
    public void agregarQuitarAreas(int caso){
        if(dialogoAgregarAreas == null){
            dialogoAgregarAreas = new AddAreasMaterial(null, true);
            dialogoAgregarAreas.setCaso(caso);
            dialogoAgregarAreas.setVisible(true); 
        }
        else
            dialogoAgregarAreas.setVisible(true);        
    }
    
    public void guardarAreasAgregadas(String cod_mat){
        ControladorMaterial cont_mat= new ControladorMaterial();  
        
        if(dialogoAgregarAreas != null 
                    && !dialogoAgregarAreas.getListaCodigos().isEmpty()){                
                               
                for(int i=0; i<dialogoAgregarAreas.getListaCodigos().size(); i++){
                    cont_mat.agregarArea(cod_mat, 
                            (String)dialogoAgregarAreas.getListaCodigos().elementAt(i));
                }
         }
    }
    
    public void desactivarMaterial(){
        ControladorMaterial controlador= new ControladorMaterial();
        Material m = new Material();
        int respuesta = -1;
        boolean completo = true;
                
        mensaje = "Hay errores en la desactivacion del Material:     " + "\n\n"; 
        if(jTFCodigo6.getText().equals("")){
            completo = false;
            mensaje += "-> El campo Codigo del Material está vacío." + "\n";
        }
        if(completo && !controlador.existeCodigo(jTFCodigo6.getText())){
            completo = false;
            mensaje += "-> El Codigo del Material ingresado no existe." + "\n";
        }
        if(completo && !controlador.esActivado(jTFCodigo6.getText())){
            completo = false;
            mensaje += "-> El Material con el codigo ingresado ya ha sido desactivado." + "\n";
        }
        if(completo){
            m = controlador.retornarMaterial(jTFCodigo6.getText());
            respuesta = JOptionPane.showConfirmDialog(this, "¿Esta seguro "
                    + "que desea desactivar el Material " + m.mostrarmeEnPantalla() + "?");
            
            if(respuesta == JOptionPane.YES_OPTION){
                controlador.descativarMaterial(jTFCodigo6.getText());
                JOptionPane.showMessageDialog(this, "El Material ha sido desactivado");
                jTFCodigo6.setText("");
            }
            
        } else{
            JOptionPane.showMessageDialog(this, mensaje, "Error de registro",
                    JOptionPane.ERROR_MESSAGE);
        }
    }
    
    public void cargarArchivo(){
        JFileChooser cargarArchivo = new JFileChooser();
        cargarArchivo.addChoosableFileFilter(new FiltroFormatosMateriales());
        cargarArchivo.setFileFilter(cargarArchivo.getChoosableFileFilters()[1]);
        int opcion = cargarArchivo.showOpenDialog(this);
        

        if(opcion == JFileChooser.APPROVE_OPTION){
           rutaArchivo = cargarArchivo.getSelectedFile().getPath();
           tamanoArchivo = String.valueOf(cargarArchivo.getSelectedFile().length());
           String nombreOriginalArchivo = cargarArchivo.getSelectedFile().getName();
           StringTokenizer punto  = new StringTokenizer(nombreOriginalArchivo, ".");
           punto.nextToken();
           formato = punto.nextToken();
           archivoCargado = true;
        }
        else
            JOptionPane.showMessageDialog(this, "No se eligió ningún Material.",
                    "Advertencia", JOptionPane.WARNING_MESSAGE);
    }
    
    public void guardarArchivo(String codigo, String formato){
        try{
            FileInputStream fis = new FileInputStream(rutaArchivo);
            FileOutputStream fos = new FileOutputStream("src/materiales/" + codigo +"." + formato);
            FileChannel inChannel = fis.getChannel();
            FileChannel outChannel = fos.getChannel();
            inChannel.transferTo(0, inChannel.size(), outChannel);
            fis.close();
            fos.close();
        }catch (IOException ioe) {
            System.err.println("Error al Generar Copia del Material\n" + ioe);
        }
    }
    
    public void llenarListasDias(){
        //Modelos con los listados de día para los combos de fechas (Dias)
        lista28Dias = new String[29];
        lista28Dias[0]= "Dia:";
        for(int i=1; i<=9; i++)
            lista28Dias[i] = "0"+String.valueOf(i); 
        for(int i=10; i<=28; i++)
            lista28Dias[i] = String.valueOf(i);        
        
        lista30Dias = new String[31];
        lista30Dias[0]= "Dia:";
        for(int i=1; i<=9; i++)
            lista30Dias[i] = "0"+String.valueOf(i); 
        for(int i=10; i<=30; i++)
            lista30Dias[i] = String.valueOf(i); 
        
        lista31Dias = new String[32];
        lista31Dias[0]= "Dia:";
        for(int i=1; i<=9; i++)
            lista31Dias[i] = "0"+String.valueOf(i);
        for(int i=10; i<=31; i++)
            lista31Dias[i] = String.valueOf(i);
    }
    
    public String[] escogerListaDias(String mes){        
        if(mes.equals("02")){
            return lista28Dias;
        }
        if(mes.equals("01") || mes.equals("03") || mes.equals("05") 
                || mes.equals("07") || mes.equals("08") || mes.equals("10") 
                || mes.equals("12")){
            return lista31Dias;
        }
        else
            return lista30Dias;
    }
    
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jBActivar;
    private javax.swing.JButton jBAddAreas1;
    private javax.swing.JButton jBAddAreas2;
    private javax.swing.JButton jBAddAuotres1;
    private javax.swing.JButton jBAddAuotres2;
    private javax.swing.JButton jBAddPalabras1;
    private javax.swing.JButton jBAddPalabras2;
    private javax.swing.JButton jBCancelaDesactivacion;
    private javax.swing.JButton jBCancelarActivacion;
    private javax.swing.JButton jBCargarArchivo;
    private javax.swing.JButton jBCatalogar;
    private javax.swing.JButton jBDesactivar;
    private javax.swing.JButton jBGuardar1;
    private javax.swing.JButton jBGuardarCatalogador;
    private javax.swing.JButton jBGuardarTipo;
    private javax.swing.JButton jBLimpiar;
    private javax.swing.JButton jBModificar1;
    private javax.swing.JButton jBModificarAdicionales;
    private javax.swing.JButton jBModificarCatlogador;
    private javax.swing.JButton jBModificarOtros;
    private javax.swing.JButton jBModificarTipo;
    private javax.swing.JButton jButton20;
    private javax.swing.JComboBox jCBAnioCreacion1;
    private javax.swing.JComboBox jCBAnioCreacion2;
    private javax.swing.JComboBox jCBAnioPublicacion1;
    private javax.swing.JComboBox jCBAnioPublicacion2;
    private javax.swing.JComboBox jCBDiaCreacion1;
    private javax.swing.JComboBox jCBDiaCreacion2;
    private javax.swing.JComboBox jCBDiaPublicacion1;
    private javax.swing.JComboBox jCBDianPublicacion2;
    private javax.swing.JComboBox jCBIdioma1;
    private javax.swing.JComboBox jCBIdioma2;
    private javax.swing.JComboBox jCBMesCreacion1;
    private javax.swing.JComboBox jCBMesCreacion2;
    private javax.swing.JComboBox jCBMesPublicacion1;
    private javax.swing.JComboBox jCBMesPublicacion2;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel33;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel58;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel13;
    private javax.swing.JPanel jPanel14;
    private javax.swing.JPanel jPanel15;
    private javax.swing.JPanel jPanel16;
    private javax.swing.JPanel jPanel17;
    private javax.swing.JPanel jPanel18;
    private javax.swing.JPanel jPanel19;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel20;
    private javax.swing.JPanel jPanel21;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JTextArea jTADescripcion1;
    private javax.swing.JTextArea jTADescripcion2;
    private javax.swing.JTextField jTEditorial1;
    private javax.swing.JTextField jTFCatalogador1;
    private javax.swing.JTextField jTFCatalogador2;
    private javax.swing.JTextField jTFCodigo1;
    private javax.swing.JTextField jTFCodigo2;
    private javax.swing.JTextField jTFCodigo3;
    private javax.swing.JTextField jTFCodigo4;
    private javax.swing.JTextField jTFCodigo5;
    private javax.swing.JTextField jTFCodigo6;
    private javax.swing.JTextField jTFCodigo7;
    private javax.swing.JTextField jTFEditorial2;
    private javax.swing.JTextField jTFTipo1;
    private javax.swing.JTextField jTFTipo2;
    private javax.swing.JTextField jTFTituloPri1;
    private javax.swing.JTextField jTFTituloPri2;
    private javax.swing.JTextField jTFTituloSec1;
    private javax.swing.JTextField jTFTituloSec2;
    private javax.swing.JTabbedPane jTabbedPane1;
    // End of variables declaration//GEN-END:variables
}
